1. Technical Field
The present invention relates to a timer device and an electronic apparatus.
2. Related Art
A timer IC (Integrated Circuit) is an IC that measures time set in advance and outputs measurement completion signals when the measurement is completed, and is used for various applications. A system can be configured in which, when, for example, a CPU (Central Processing Unit) is set to be in a sleep mode in order to reduce power consumption and then, after a predetermined time elapses, a predetermined calculation process has to be performed by activating the CPU, a measurement completion signal output by a timer IC, after measuring the predetermined time is input to the CPU, as an interrupt signal, the CPU receives the interrupt signal, and accordingly the predetermined calculation process is performed.
JP-A-3-250226 is an example of the related art.
Two methods are considered as a method of setting a measurement time of the timer IC. One setting method is to write a set value of a measurement time in an internal register via an external terminal for a serial interface (a serial clock terminal, a serial data terminal, or the like) of a timer IC, and the other setting method is to set a measurement time directly in a plurality of external terminals of a timer IC. The former setting method may use a small number of terminals for setting the timer IC and is advantageous in terms of low cost since an inexpensive package can be selected. However, when the timer IC is mounted in a vehicle, for example, the device is required to have high reliability, but due to an effect of noise resulting from an engine, or the like, or due to a bug in a program used to write a set value, there is a concern that an incorrect set value will be written, which may impair reliability thereof. Therefore, when high reliability is required, the latter setting method is effective, but a number of terminals for setting of the timer IC have to be secured. For this reason, when low cost is required, it is necessary to reduce the number of terminals other than terminals for setting to be as low as possible so as to use an inexpensive package.
Further, in order to reduce a possibility of performing the incorrect setting due to influence of noise, or the like, it is desirable for a timer IC to perform measurement by incorporating a set value of an external terminal only when the set value is desired to be changed, and to perform measurement without incorporating a set value of an external terminal when it is not necessary to change the set value (without overwriting the same set value). With regard to this, it is better for a timer IC to be provided with a dedicated external terminal for selecting whether or not a set value of an external terminal is to be incorporated, but as described above, there are cases in which there are no terminals to spare, or in which it is difficult to assign a dedicated external terminal.